package com.lee.service;

import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

public interface SSEService {
    /**
     * 创建SSE连接
     * @param uid
     * @return
     */
    public SseEmitter crateSse(String uid);

    /**
     * 发送消息
     * @param uid
     * @param messageId
     * @param message
     * @return
     */
    public boolean sendMessage(String uid,String messageId,String message);

    /**
     * 关闭SSE连接
     * @param uid
     */
    public void closeSse(String uid);
}
